#ifndef OPPOINT
#define OPPOINT

#include "VMPFocus.hpp"
#include "operations.hpp"//Operation .
#include "AWSParser.hpp"

cText TEXT_POINT=".";
cText TEXT_POINTTXT="point";

//formula:
//(:higher:|:same:):blank:?\.:blank:?:name:

//PreLining:
void funOpPPreL(ListIdentity* what){
	fPreL_priority(&TEXT_POINT, what);
	ParserRename(what,TEXT_NAME);
	/*
	ptrOperation opN=Operations["name"];
	for(int i=0; i<what->length(); ++i){
		if ((*what)[i]->Operation==opN)
			(*what)[i]->Identifier="name";
	};*/
};
//PostLining:

//MkTree:

//Evaluate:
sRecord funOpPEva(ptrRETNode retnode, ptrParsedElement pe, void* scope){
	ptrDough Dough=eval(retnode,pe->SubElements[0],scope).dough;
		//pe->SubElements[0]->Operation->onEvaluate(retnode, pe->SubElements[0],scope);
	return eval(retnode,pe->SubElements[1],Dough);//->Operation->onEvaluate(retnode,pe->SubElements[1],Dough);
}

ptrOperation loadOpPoint(){
	
	ptrOperation tmp=new cOperation();
	tmp->Name=TEXT_POINT;
	tmp->Formula="(:higher:|:same:|:name:)\\.:name:";
	tmp->onEvaluate=funOpPEva;
	tmp->onPreLining=funOpPPreL;
	tmp->onPostLining=NULL;
	tmp->onMakingTree=NULL;
	return tmp;
}

#endif